﻿// --------------------------------------------------------------------------------------------------------------------- 
// <copyright file="LinkType.cs" company="Scrum for Team System">
//   None
// </copyright>
// <summary>
//   Defines the LinkType type.
// </summary>
// ---------------------------------------------------------------------------------------------------------------------
namespace ScrumForTeamSystem.EventService.TransitionService.DataStructures
{
    using System.Xml.Serialization;

    /// <summary>
    /// The Linkage option.
    /// </summary>
    public enum LinkOption
    {
        /// <summary>
        /// Linked to another work item.
        /// </summary>
        LinkedItem = 0,

        /// <summary>
        /// Linked to the source work item.
        /// </summary>
        Self = 1
    }

    /// <summary>
    /// Defines the LinkType type.
    /// </summary>
    public class LinkType
    {
        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The link name.</value>
        [XmlText]
        public string Name
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the target.
        /// </summary>
        /// <value>The rule target.</value>
        [XmlAttribute(AttributeName = "target")]
        public LinkOption Target
        {
            get;
            set;
        }
    }
}
